package com.tomowork.service.impl;

import com.tomowork.dao.IDeptDAO;
import com.tomowork.entity.Dept;
import com.tomowork.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("iDeptService")
@Transactional
public class DeptServcieImpl implements IDeptService {
    @Autowired
    private IDeptDAO deptDAO ;
    @Override
    public void insert(Dept dept) {
        deptDAO.doCreate(dept);
    }

    @Override
    public List<Dept> findAll() {
        return deptDAO.findAll();
    }
}
